<?php

namespace app\admin\controller;

use app\common\model\Admin;
use think\Controller;
use think\Request;
use think\response\View;

/**
 *  Admin
 *  后台登录控制器 admin.controller.login
 * Class Login
 * @package app\admin\controller
 */
class Common extends Controller
{
    public function __construct ( Request $request = null )
    {
        parent::__construct( $request );
        //检测如果session没有admin.admin_id就跳转到登录页面
        if(!session('admin.admin_id'))
        {
            $this->redirect('admin/login/login');
        }
    }

}
